<% if (pub.isEnableModelRT() && (item.type) && item.type != 'LINK') { %>\
package ${item.getParentPSModelObject().getPKGCodeName()}.${item.getParentPSModelObject().realCodeName.toLowerCase()}.dto

import java.util.*
import java.math.*
import java.sql.Timestamp
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonInclude
import net.ibizsys.central.util.*
import cn.ibizlab.central.plugin.groovy.annotation.DEDataModel
import cn.ibizlab.central.plugin.groovy.dataentity.dto.*
<% item.getPSDEMethodDTOFields().each{ field ->
    if(field.type == 'DTO' || field.type == 'DTOS') {
        if(field.getRefPSDEMethodDTO()) {%>\
import ${field.getRefPSDEMethodDTO().getParentPSModelObject().getPKGCodeName()}.${field.getRefPSDEMethodDTO().getParentPSModelObject().realCodeName.toLowerCase()}.dto.${field.getRefPSDEMethodDTO().realCodeName}
<% }}} %>\

@DEDataModel
@JsonInclude(JsonInclude.Include.NON_NULL)
class ${item.realCodeName} extends ${item.baseClass} {

<% if(item.type=='DEFAULT'||item.type=='DEACTIONINPUT'){
    item.getPSDEMethodDTOFields().each{ field ->
        %>\
    /**
     * 「${field.getLogicName()}」
<% if (field.getPSDEField() && field.getPSDEField().getPSCodeList() ) { %>\
     * 字典[${field.getPSDEField().getPSCodeList().getName()}]
<%  }%>\
     */
    @JsonProperty("${field.name.toLowerCase()}")
    ${field.javaType} ${field.realCodeName.uncapitalize()}
<% } %>\
<% item.getPSDEMethodDTOFields().each{ field -> %>\

    /**
     * 设置「${field.getLogicName()}」值
<% if (field.getPSDEField() && field.getPSDEField().getPSCodeList() ) { %>\
     * 字典[${field.getPSDEField().getPSCodeList().getName()}]
<%  }%>\
     * @param val
     */
    ${item.realCodeName} set${field.realCodeName.capitalize()}(${field.javaType} ${field.realCodeName.uncapitalize()}) {
        this.${field.realCodeName.uncapitalize()} = ${field.realCodeName.uncapitalize()}
        return this
    }

<%
    }
}
%>\
}
<% } %>